package net.projecteuler.prob;

public class Problem76 implements Runnable {

	private static final int MAX = 100;
	
	@Override
	public void run() {
		// initialize
		int[][] cnt = new int[MAX + 1][];
		for(int i = 0; i <= MAX; i++){
			cnt[i] = new int[i + 1];
		}
		cnt[0][0] = 1;
		
		for(int i = 1; i <= MAX; i++){
			for(int j = 1; j <= i; j++){
				int remain = i - j;
				int sum = 0;
				for(int k = 0; (k <= j) && (k <= remain); k++)
					sum += cnt[remain][k];
				cnt[i][j] = sum;
			}
		}

		int sum = 0;
		for(int i = 0; i < MAX; i++)
			sum += cnt[MAX][i];
		System.out.println(sum);
	}
}
